package org.liveboardgames.agricola.control.delegates.action.prerequisite
{
    import org.liveboardgames.agricola.control.delegates.helper.GameHelper;
    import org.liveboardgames.agricola.model.AgricolaModelLocator;
    import org.liveboardgames.agricola.vo.player.Player;
    
    public class AvailablePeepPrerequisiteChecker extends PrerequisiteChecker
    {
        public function AvailablePeepPrerequisiteChecker(player:Player)
        {
            super(player);
        }
        
        override public function check():Boolean
        {
            // Check that there is at least one peep left to play
            var hasPeepLeft:Boolean = GameHelper.hasPeepLeftForPlayer(AgricolaModelLocator.getInstance().game, player);
            
            return hasPeepLeft;
        }
    
    }
}